package pattern.observer;

public class ObserverDemo {
    public static void main(String[] args) {
        ProductList productList = ProductList.getInstance();
        JdObserver jdObserver = new JdObserver();
        TbObserver tbObserver = new TbObserver();
        productList.addProductListObserver(jdObserver);
        productList.addProductListObserver(tbObserver);
        productList.addProduct("iPhone11");
    }
}
